//
// Created by PC on 2023/6/27.
//


#include <iostream>

using namespace std;

int main()
{
    // 字符数组单个赋值, 结尾不会加'\0', 长度就是5
    char one[]={'h','e','l','l','o'};
    // 用字符串赋值, 结尾会自动添加'\0', 长度会+1
    // 如果用string.h模块中的strlen()函数, 返回的长度不包括'\0', 也就是不+1
    char two[]="hello";
    printf("length of one = %d\n", sizeof(one)/sizeof(char));
    printf("length of two = %d\n", sizeof(two)/sizeof(char));
    char three[]="123";
    int n = atoi(three);
    cout<<n;
    return 0;
}